﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DevExpress.Web.ASPxGridView;

namespace Project_Udrinkwater.PagesAdmin
{
    public partial class Invoice : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }
        protected void LinkButton1_Command(object sender, CommandEventArgs e)
        {
            Session["Invoice_ID"] = e.CommandArgument.ToString();
            Response.Redirect("~/Empoyee_Management/InvoiceBill.aspx");
        }
        protected void ASPxGridView1_BeforePerformDataSelect(object sender, EventArgs e)
        {
            Session["Order_ID"] = (sender as ASPxGridView).GetMasterRowFieldValues("Order_ID");
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            UpdateExportMode();
            ASPxGridViewExporter1.WritePdfToResponse("รายงานการส่งสินค้า");
        }

        protected void UpdateExportMode()
        {
            ASPxGridViewMaster.SettingsDetail.ExportMode = (GridViewDetailExportMode)Enum.Parse(typeof(GridViewDetailExportMode), GridViewDetailExportMode.All.ToString());
        }
       
    }
}